xdg_shell_use_unstable_version (display_wayland->xdg_shell, XDG_SHELL_VERSION_CURRENT);
xdg_shell_add_listener (display_wayland->xdg_shell, &xdg_shell_listener, display_wayland);
}
- else if (strcmp (interface, "gtk_shell") == 0)
+ else if (strcmp (interface, "gtk_shell1") == 0)
{
- if (version >= MINIMUM_GTK_SHELL_VERSION)
- {
- version = MIN (version, SUPPORTED_GTK_SHELL_VERSION);
- display_wayland->gtk_shell =
- wl_registry_bind(display_wayland->wl_registry, id,
- >k_shell_interface, version);
- _gdk_wayland_screen_set_has_gtk_shell (display_wayland->screen);
- display_wayland->gtk_shell_version = version;
- }
+ display_wayland->gtk_shell =
+ wl_registry_bind(display_wayland->wl_registry, id,
+ >k_shell1_interface,
+ 1);
+ _gdk_wayland_screen_set_has_gtk_shell (display_wayland->screen);
+ display_wayland->gtk_shell_version = version;
}
else if (strcmp (interface, "wl_output") == 0)
{
return;
}
- if (display_wayland->gtk_shell_version >= GTK_SHELL_HAS_SET_STARTUP_ID)
- gtk_shell_set_startup_id (display_wayland->gtk_shell, startup_id);
+ if (display_wayland->gtk_shell)
+ gtk_shell1_set_startup_id (display_wayland->gtk_shell, startup_id);
g_free (free_this);
}
struct wl_compositor *compositor;
struct wl_shm *shm;
struct xdg_shell *xdg_shell;
- struct gtk_shell *gtk_shell;
+ struct gtk_shell1 *gtk_shell;
struct wl_input_device *input_device;
struct wl_data_device_manager *data_device_manager;
struct wl_subcompositor *subcompositor;
#define WL_SURFACE_HAS_BUFFER_SCALE 3
#define WL_POINTER_HAS_FRAME 5
-#define SUPPORTED_GTK_SHELL_VERSION 3
-#define MINIMUM_GTK_SHELL_VERSION 2
-#define GTK_SHELL_HAS_SET_STARTUP_ID 3
-
#define GDK_WINDOW_IS_WAYLAND(win) (GDK_IS_WINDOW_IMPL_WAYLAND (((GdkWindow *)win)->impl))
GdkKeymap *_gdk_wayland_keymap_new (void);
}
static void
-gtk_shell_handle_capabilities (void *data,
- struct gtk_shell *shell,
- uint32_t capabilities)
+gtk_shell_handle_capabilities (void *data,
+ struct gtk_shell1 *shell,
+ uint32_t capabilities)
{
GdkScreen *screen = data;
GdkWaylandScreen *screen_wayland = GDK_WAYLAND_SCREEN (data);
notify_setting (screen, "gtk-shell-shows-desktop");
}
-struct gtk_shell_listener gdk_screen_gtk_shell_listener = {
+struct gtk_shell1_listener gdk_screen_gtk_shell_listener = {
gtk_shell_handle_capabilities
};
{
GdkWaylandDisplay *wayland_display = GDK_WAYLAND_DISPLAY (GDK_WAYLAND_SCREEN (screen)->display);
- gtk_shell_add_listener (wayland_display->gtk_shell, &gdk_screen_gtk_shell_listener, screen);
+ gtk_shell1_add_listener (wayland_display->gtk_shell,
+ &gdk_screen_gtk_shell_listener,
+ screen);
}
static void
static gboolean
set_capability_setting (GdkScreen *screen,
GValue *value,
- enum gtk_shell_capability test)
+ enum gtk_shell1_capability test)
{
GdkWaylandScreen *wayland_screen = GDK_WAYLAND_SCREEN (screen);
}
if (strcmp (name, "gtk-shell-shows-app-menu") == 0)
- return set_capability_setting (screen, value, GTK_SHELL_CAPABILITY_GLOBAL_APP_MENU);
+ return set_capability_setting (screen, value,
+ GTK_SHELL1_CAPABILITY_GLOBAL_APP_MENU);
if (strcmp (name, "gtk-shell-shows-menubar") == 0)
- return set_capability_setting (screen, value, GTK_SHELL_CAPABILITY_GLOBAL_MENU_BAR);
+ return set_capability_setting (screen, value,
+ GTK_SHELL1_CAPABILITY_GLOBAL_MENU_BAR);
if (strcmp (name, "gtk-shell-shows-desktop") == 0)
- return set_capability_setting (screen, value, GTK_SHELL_CAPABILITY_DESKTOP_ICONS);
+ return set_capability_setting (screen, value,
+ GTK_SHELL1_CAPABILITY_DESKTOP_ICONS);
if (strcmp (name, "gtk-dialogs-use-header") == 0)
{
struct wl_surface *wl_surface;
struct xdg_surface *xdg_surface;
struct xdg_popup *xdg_popup;
- struct gtk_surface *gtk_surface;
+ struct gtk_surface1 *gtk_surface;
struct wl_subsurface *wl_subsurface;
struct wl_egl_window *egl_window;
struct wl_egl_window *dummy_egl_window;
if (impl->display_server.gtk_surface)
{
- gtk_surface_destroy (impl->display_server.gtk_surface);
+ gtk_surface1_destroy (impl->display_server.gtk_surface);
impl->display_server.gtk_surface = NULL;
}
if (display->gtk_shell == NULL)
return;
- impl->display_server.gtk_surface = gtk_shell_get_gtk_surface (display->gtk_shell,
- impl->display_server.wl_surface);
+ impl->display_server.gtk_surface =
+ gtk_shell1_get_gtk_surface (display->gtk_shell,
+ impl->display_server.wl_surface);
}
static void
return;
if (window->modal_hint)
- gtk_surface_set_modal (impl->display_server.gtk_surface);
+ gtk_surface1_set_modal (impl->display_server.gtk_surface);
else
- gtk_surface_unset_modal (impl->display_server.gtk_surface);
+ gtk_surface1_unset_modal (impl->display_server.gtk_surface);
}
if (impl->display_server.gtk_surface == NULL)
return;
- gtk_surface_set_dbus_properties (impl->display_server.gtk_surface,
- impl->application.application_id,
- impl->application.app_menu_path,
- impl->application.menubar_path,
- impl->application.window_object_path,
- impl->application.application_object_path,
- impl->application.unique_bus_name);
+ gtk_surface1_set_dbus_properties (impl->display_server.gtk_surface,
+ impl->application.application_id,
+ impl->application.app_menu_path,
+ impl->application.menubar_path,
+ impl->application.window_object_path,
+ impl->application.application_object_path,
+ impl->application.unique_bus_name);
impl->application.was_set = TRUE;
}
<protocol name="gtk">
- <interface name="gtk_shell" version="3">
+ <interface name="gtk_shell1" version="1">
<description summary="gtk specific extensions">
gtk_shell is a protocol extension providing additional features for
- clients implementing it. It is not backward compatible, and a client must
- always only bind to the specific version it implements. If a client binds
- to a version different from the version the server provides, an error will
- be raised.
+ clients implementing it.
</description>
<enum name="capability">
</event>
<request name="get_gtk_surface">
- <arg name="gtk_surface" type="new_id" interface="gtk_surface"/>
+ <arg name="gtk_surface" type="new_id" interface="gtk_surface1"/>
<arg name="surface" type="object" interface="wl_surface"/>
</request>
- <request name="set_startup_id" since="3">
+ <request name="set_startup_id">
<arg name="startup_id" type="string" allow-null="true"/>
</request>
</interface>
- <interface name="gtk_surface" version="3">
+ <interface name="gtk_surface1" version="1">
<request name="set_dbus_properties">
<arg name="application_id" type="string" allow-null="true"/>
<arg name="app_menu_path" type="string" allow-null="true"/>